define(function(require, exports, module) {
  var version = '0.0.1';

  var lang = {
    global: {
      copyright: {
        value: 'Copyright',
        text: 'Copyright &copy; 2015-2016 cnavon . All rights reserved.'
      },
      version: {
        value: 'Version',
        text: '<b>Version</b> ' + version
      },
      please_input: {value: 'Please Input ', text: '请输入'},
      not_allowed_empty: {value: ' Not Allowed Empty', text: '不允许为空'},
      unavailable: {value: 'Unavailable', text: '无效的'},
      sure_to_remove: {value: 'Are you sure to remove?', text: '您确定删除吗？'},
      my: {value: 'My', text: '我的'},
      manage: {value: ' Manage ', text: '管理'},
      new: {value: 'New', text: '新增'},
      edit: {value: 'Edit', text: '编辑'},
      save: {value: 'Save', text: '保存'},
      cancel: {value: 'Cancel', text: '取消'},
      failed: {value: 'Failed', text: '失败'},
      validate: {value: 'Validate', text: '验证'},
      error: {value: 'Error', text: '错误'},
      info: {value: 'Information', text: '信息'},
      close: {value: 'Close', text: '关闭'},
      yes: {value: 'Yes', text: '是'},
      no: {value: 'No', text: '否'},
      warn: {value: 'Warning', text: '警告'},
      success: {value: 'Successful', text: '成功'},
      remove: {value: 'Remove', text: '删除'},
      title: {value: 'Title', text: '标题'},
      country: {value: 'Country', text: '国家'},
      category: {value: 'Category', text: '类别'},
      priority: {value: 'Priority', text: '优先级'},
      detail: {value: 'Detail', text: '描述'},
      todo: {value: 'Todo', text: '工单'},
      uc_pwd: {value: 'Change password', text: '修改密码'},
      example: {value: 'Example', text: '范例'},
      list: {value: 'List', text: '列表'},
      setting: {value: 'Setting', text: '设置'},
      user: {value: 'User', text: '用户'},
      signin: {value: 'Signin', text: '登录'},
      signup: {value: 'Signup', text: '注册'},
      commit: {value: 'Commit', text: '提交'},
      reset: {value: 'Reset', text: '重置'},
      password: {value: 'Password', text: '密码'},
      email: {value: 'Email', text: '电子邮箱'},
      timesheet: {value: 'Timesheet', text: '时间表'},
      date: {value: 'Date', text: '日期'},
      action: {value: 'Action', text: '操作'},
      view: {value: 'View', text: '查看'},
      hello: {value: 'Hello', text: '，您好！'},
      global: {value: 'Global', text: '全球'}
    },
    error: {
      '210': {value: 'The username and password mismatch.', text: '用户名和密码不匹配'}
    },
    info: {
      '101': {value: 'Resend activate email', text: '重新发送激活邮件'},
      '102': {value: '<p>Will jump in 5 sec</p>', text: '<p>将在5秒后跳转</p>'},
      '103': {value: 'Remember me', text: '记住我'},
      '104': {value: 'Forget password?', text: '忘记密码？'},
      '105': {value: 'Send email again to reset password', text: '发送重置密码邮件'},
      '106': {value: 'Confirmed password', text: '确认密码'},
      '107': {value: 'Please select ', text: '请选择以下图片中的 '},
      '108': {value: 'To should be after From', text: '结束时间必须在开始时间之后'},
      '109': {value: 'There is not more records', text: '所有记录都加载完成'}
    },
    country: {
      AD: {value: 'Andorra, Principality of', text: ''},
      AE: {value: 'United Arab Emirates', text: ''},
      AF: {value: 'Afghanistan, Islamic State of', text: ''},
      AG: {value: 'Antigua and Barbuda', text: ''},
      AI: {value: 'Anguilla', text: ''},
      AL: {value: 'Albania', text: ''},
      AM: {value: 'Armenia', text: ''},
      AN: {value: 'Netherlands Antilles', text: ''},
      AO: {value: 'Angola', text: ''},
      AQ: {value: 'Antarctica', text: ''},
      AR: {value: 'Argentina', text: '阿根廷'},
      AS: {value: 'American Samoa', text: ''},
      AT: {value: 'Austria', text: ''},
      AU: {value: 'Australia', text: '澳大利亚'},
      AW: {value: 'Aruba', text: ''},
      AX: {value: 'Åland Islands', text: ''},
      AZ: {value: 'Azerbaijan', text: ''},
      BA: {value: 'Bosnia-Herzegovina', text: ''},
      BB: {value: 'Barbados', text: ''},
      BD: {value: 'Bangladesh', text: ''},
      BE: {value: 'Belgium', text: ''},
      BF: {value: 'Burkina Faso', text: ''},
      BG: {value: 'Bulgaria', text: ''},
      BH: {value: 'Bahrain', text: ''},
      BI: {value: 'Burundi', text: ''},
      BJ: {value: 'Benin', text: ''},
      BL: {value: 'Saint Barthélémy', text: ''},
      BM: {value: 'Bermuda', text: ''},
      BN: {value: 'Brunei Darussalam', text: ''},
      BO: {value: 'Bolivia', text: ''},
      BQ: {value: 'Bonaire, Sint Eustatius and Saba', text: ''},
      BR: {value: 'Brazil', text: ''},
      BS: {value: 'Bahamas', text: ''},
      BT: {value: 'Bhutan', text: ''},
      BV: {value: 'Bouvet Island', text: ''},
      BW: {value: 'Botswana', text: ''},
      BY: {value: 'Belarus', text: ''},
      BZ: {value: 'Belize', text: ''},
      CA: {value: 'Canada', text: '加拿大'},
      CC: {value: 'Cocos (Keeling) Islands', text: ''},
      CD: {value: 'Congo, Democratic Republic of the', text: ''},
      CF: {value: 'Central African Republic', text: ''},
      CG: {value: 'Congo', text: ''},
      CH: {value: 'Switzerland', text: ''},
      CI: {value: 'Ivory Coast (Cote D\'Ivoire)', text: ''},
      CK: {value: 'Cook Islands', text: ''},
      CL: {value: 'Chile', text: '智利'},
      CM: {value: 'Cameroon', text: ''},
      CN: {value: 'China', text: '中国'},
      CO: {value: 'Colombia', text: ''},
      CR: {value: 'Costa Rica', text: ''},
      CU: {value: 'Cuba', text: ''},
      CV: {value: 'Cape Verde', text: ''},
      CW: {value: 'Curaçao', text: ''},
      CX: {value: 'Christmas Island', text: ''},
      CY: {value: 'Cyprus', text: ''},
      CZ: {value: 'Czech Republic', text: ''},
      DE: {value: 'Germany', text: ''},
      DJ: {value: 'Djibouti', text: ''},
      DK: {value: 'Denmark', text: ''},
      DM: {value: 'Dominica', text: ''},
      DO: {value: 'Dominican Republic', text: ''},
      DZ: {value: 'Algeria', text: ''},
      EC: {value: 'Ecuador', text: ''},
      EE: {value: 'Estonia', text: ''},
      EG: {value: 'Egypt', text: ''},
      EH: {value: 'Western Sahara', text: ''},
      ER: {value: 'Eritrea', text: ''},
      ES: {value: 'Spain', text: '西班牙'},
      ET: {value: 'Ethiopia', text: ''},
      FI: {value: 'Finland', text: ''},
      FJ: {value: 'Fiji', text: ''},
      FK: {value: 'Falkland Islands', text: ''},
      FM: {value: 'Micronesia', text: ''},
      FO: {value: 'Faroe Islands', text: ''},
      FR: {value: 'France', text: '法国'},
      GA: {value: 'Gabon', text: ''},
      GB: {value: 'United Kingdom', text: '英国'},
      GD: {value: 'Grenada', text: ''},
      GE: {value: 'Georgia', text: ''},
      GF: {value: 'French Guyana', text: ''},
      GG: {value: 'Guernsey', text: ''},
      GH: {value: 'Ghana', text: ''},
      GI: {value: 'Gibraltar', text: ''},
      GL: {value: 'Greenland', text: ''},
      GM: {value: 'Gambia', text: ''},
      GN: {value: 'Guinea', text: ''},
      GP: {value: 'Guadeloupe (French)', text: ''},
      GQ: {value: 'Equatorial Guinea', text: ''},
      GR: {value: 'Greece', text: ''},
      GS: {value: 'South Georgia and the South Sandwich Islands', text: ''},
      GT: {value: 'Guatemala', text: ''},
      GU: {value: 'Guam (USA)', text: ''},
      GW: {value: 'Guinea Bissau', text: ''},
      GY: {value: 'Guyana', text: ''},
      HM: {value: 'Heard and McDonald Islands', text: ''},
      HN: {value: 'Honduras', text: ''},
      HR: {value: 'Croatia', text: ''},
      HT: {value: 'Haiti', text: ''},
      HU: {value: 'Hungary', text: ''},
      ID: {value: 'Indonesia', text: ''},
      IE: {value: 'Ireland', text: ''},
      IL: {value: 'Israel', text: ''},
      IM: {value: 'Isle of Man', text: ''},
      IN: {value: 'India', text: '印度'},
      IO: {value: 'British Indian Ocean Territory', text: ''},
      IQ: {value: 'Iraq', text: ''},
      IR: {value: 'Iran', text: ''},
      IS: {value: 'Iceland', text: ''},
      IT: {value: 'Italy', text: '意大利'},
      JE: {value: 'Jersey', text: ''},
      JM: {value: 'Jamaica', text: ''},
      JO: {value: 'Jordan', text: ''},
      JP: {value: 'Japan', text: '日本'},
      KE: {value: 'Kenya', text: ''},
      KG: {value: 'Kyrgyz Republic (Kyrgyzstan)', text: ''},
      KH: {value: 'Cambodia, Kingdom of', text: ''},
      KI: {value: 'Kiribati', text: ''},
      KM: {value: 'Comoros', text: ''},
      KN: {value: 'Saint Kitts & Nevis Anguilla', text: ''},
      KP: {value: 'North Korea', text: '朝鲜'},
      KR: {value: 'South Korea', text: '韩国'},
      KW: {value: 'Kuwait', text: ''},
      KY: {value: 'Cayman Islands', text: ''},
      KZ: {value: 'Kazakhstan', text: ''},
      LA: {value: 'Laos', text: ''},
      LB: {value: 'Lebanon', text: ''},
      LC: {value: 'Saint Lucia', text: ''},
      LI: {value: 'Liechtenstein', text: ''},
      LK: {value: 'Sri Lanka', text: ''},
      LR: {value: 'Liberia', text: ''},
      LS: {value: 'Lesotho', text: ''},
      LT: {value: 'Lithuania', text: ''},
      LU: {value: 'Luxembourg', text: ''},
      LV: {value: 'Latvia', text: ''},
      LY: {value: 'Libya', text: ''},
      MA: {value: 'Morocco', text: ''},
      MC: {value: 'Monaco', text: ''},
      MD: {value: 'Moldavia', text: ''},
      ME: {value: 'Montenegro', text: ''},
      MF: {value: 'Saint Martin (French part)', text: ''},
      MG: {value: 'Madagascar', text: ''},
      MH: {value: 'Marshall Islands', text: ''},
      MK: {value: 'Macedonia, the former Yugoslav Republic of', text: ''},
      ML: {value: 'Mali', text: ''},
      MM: {value: 'Myanmar', text: ''},
      MN: {value: 'Mongolia', text: ''},
      MO: {value: 'Macau', text: ''},
      MP: {value: 'Northern Mariana Islands', text: ''},
      MQ: {value: 'Martinique (French)', text: ''},
      MR: {value: 'Mauritania', text: ''},
      MS: {value: 'Montserrat', text: ''},
      MT: {value: 'Malta', text: ''},
      MU: {value: 'Mauritius', text: ''},
      MV: {value: 'Maldives', text: ''},
      MW: {value: 'Malawi', text: ''},
      MX: {value: 'Mexico', text: '墨西哥'},
      MY: {value: 'Malaysia', text: '马来西亚'},
      MZ: {value: 'Mozambique', text: ''},
      NA: {value: 'Namibia', text: ''},
      NC: {value: 'New Caledonia (French)', text: ''},
      NE: {value: 'Niger', text: ''},
      NF: {value: 'Norfolk Island', text: ''},
      NG: {value: 'Nigeria', text: ''},
      NI: {value: 'Nicaragua', text: ''},
      NL: {value: 'Netherlands', text: ''},
      NO: {value: 'Norway', text: ''},
      NP: {value: 'Nepal', text: ''},
      NR: {value: 'Nauru', text: ''},
      NT: {value: 'Neutral Zone', text: ''},
      NU: {value: 'Niue', text: ''},
      NZ: {value: 'New Zealand', text: '新西兰'},
      OM: {value: 'Oman', text: ''},
      PA: {value: 'Panama', text: ''},
      PE: {value: 'Peru', text: ''},
      PF: {value: 'Polynesia (French)', text: ''},
      PG: {value: 'Papua New Guinea', text: ''},
      PH: {value: 'Philippines', text: '菲律宾'},
      PK: {value: 'Pakistan', text: ''},
      PL: {value: 'Poland', text: '波兰'},
      PM: {value: 'Saint Pierre and Miquelon', text: ''},
      PN: {value: 'Pitcairn Island', text: ''},
      PR: {value: 'Puerto Rico', text: ''},
      PS: {value: 'Palestinian Territory, Occupied', text: ''},
      PT: {value: 'Portugal', text: ''},
      PW: {value: 'Palau', text: ''},
      PY: {value: 'Paraguay', text: ''},
      QA: {value: 'Qatar', text: ''},
      RE: {value: 'Reunion (French)', text: ''},
      RO: {value: 'Romania', text: ''},
      RS: {value: 'Serbia', text: ''},
      RU: {value: 'Russian Federation', text: '俄罗斯'},
      RW: {value: 'Rwanda', text: ''},
      SA: {value: 'Saudi Arabia', text: ''},
      SB: {value: 'Solomon Islands', text: ''},
      SC: {value: 'Seychelles', text: ''},
      SD: {value: 'Sudan', text: ''},
      SE: {value: 'Sweden', text: ''},
      SG: {value: 'Singapore', text: ''},
      SH: {value: 'Saint Helena', text: ''},
      SI: {value: 'Slovenia', text: ''},
      SJ: {value: 'Svalbard and Jan Mayen Islands', text: ''},
      SK: {value: 'Slovakia', text: ''},
      SL: {value: 'Sierra Leone', text: ''},
      SM: {value: 'San Marino', text: ''},
      SN: {value: 'Senegal', text: ''},
      SO: {value: 'Somalia', text: ''},
      SR: {value: 'Suriname', text: ''},
      SS: {value: 'South Sudan', text: ''},
      ST: {value: 'Saint Tome (Sao Tome) and Principe', text: ''},
      SV: {value: 'El Salvador', text: ''},
      SX: {value: 'Sint Maarten (Dutch part)', text: ''},
      SY: {value: 'Syria', text: ''},
      SZ: {value: 'Swaziland', text: ''},
      TC: {value: 'Turks and Caicos Islands', text: ''},
      TD: {value: 'Chad', text: ''},
      TF: {value: 'French Southern Territories', text: ''},
      TG: {value: 'Togo', text: ''},
      TH: {value: 'Thailand', text: '泰国'},
      TJ: {value: 'Tajikistan', text: ''},
      TK: {value: 'Tokelau', text: ''},
      TM: {value: 'Turkmenistan', text: ''},
      TN: {value: 'Tunisia', text: ''},
      TO: {value: 'Tonga', text: ''},
      TP: {value: 'East Timor', text: ''},
      TR: {value: 'Turkey', text: ''},
      TT: {value: 'Trinidad and Tobago', text: ''},
      TV: {value: 'Tuvalu', text: ''},
      TZ: {value: 'Tanzania', text: ''},
      UA: {value: 'Ukraine', text: ''},
      UG: {value: 'Uganda', text: ''},
      UM: {value: 'USA Minor Outlying Islands', text: ''},
      US: {value: 'United States', text: '美国'},
      UY: {value: 'Uruguay', text: ''},
      UZ: {value: 'Uzbekistan', text: ''},
      VA: {value: 'Holy See (Vatican City State)', text: ''},
      VC: {value: 'Saint Vincent & Grenadines', text: ''},
      VE: {value: 'Venezuela', text: ''},
      VG: {value: 'Virgin Islands (British)', text: ''},
      VI: {value: 'Virgin Islands (USA)', text: ''},
      VN: {value: 'Vietnam', text: ''},
      VU: {value: 'Vanuatu', text: ''},
      WF: {value: 'Wallis and Futuna Islands', text: ''},
      WS: {value: 'Samoa', text: ''},
      YE: {value: 'Yemen', text: ''},
      YT: {value: 'Mayotte', text: ''},
      YU: {value: 'Yugoslavia', text: ''},
      ZA: {value: 'South Africa', text: '南非'},
      ZM: {value: 'Zambia', text: '赞比亚'},
      ZR: {value: 'Zaire', text: ''},
      ZW: {value: 'Zimbabwe', text: ''}
    },
    button: {
      newOne: {value: 'Add', text: '新增'},
      newBatch: {value: 'Add Batch', text: '批量添加'},
      edit: {value: 'Edit', text: '编辑'},
      remove: {value: 'Delete', text: '删除'},
      more: {value: 'More', text: '更多'},
      back: {value: 'Back', text: '返回'},
      close: {value: 'Close', text: '关闭'},
      save: {value: 'Save', text: '保存'},
      cancel: {value: 'Cancel', text: '取消'},
      apply: {value: 'Apply', text: '应用'}
    },
    example: {
      title: {value: 'Title', text: '标题'},
      message: {value: 'Message', text: '内容'}
    },
    todo: {
      hours: {value: 'Hours', text: '工作量(Hours)'},
      itsm: {value: 'ITSM ID', text: '工单编号'},
      start: {value: 'Start Date', text: '开始日期'},
      end: {value: 'End Date', text: '结束日期'},
      fromTo: {value: 'From To', text: '起止日期'}
    },
    timesheet: {
      from: {value: 'From', text: '开始时间'},
      to: {value: 'To', text: '结束时间'},
      hours: {value: 'Hours', text: '用时(hours)'}
    },
    ucenter: {
      oldPWD: {value: 'Old password', text: '旧密码'},
      newPWD: {value: 'New password', text: '新密码'},
      PWD2: {value: 'Confirmed password', text: '确认密码'},
      same_pwd: {value: 'Confirmed password is different from New password', text: '确认密码与新密码不一致'},
      pwd_changed: {value: 'Password changed', text: '密码已更改'}
    }
  };

  var get = function(key, domain) {
    domain = domain || 'global';
    var obj = lang[domain][key] || {};
    return obj.text || obj.value;
  };

  module.exports = {
    global: lang.global,
    button: lang.button,
    example: lang.example,
    get: get,
    getCountry: function(key) {
      return get(key, 'country');
    },
    getError: function(key) {
      return get(key, 'error');
    },
    button: function(key) {
      return get(key, 'button');
    },
    country: function(key) {
      return get(key, 'country');
    },
    error: function(key) {
      return get(key, 'error');
    },
    info: function(key) {
      return get(key, 'info');
    }
  };
});